﻿namespace ShellNavigator.Client.Utils
{
  #region

  using System;
  using System.Globalization;
  using System.Windows;
  using System.Windows.Data;

  #endregion

  /// <summary>
  ///     TODO: Update summary.
  /// </summary>
  public class CountConverter : IValueConverter
  {
    #region Public Methods

    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
    {
      if (value is int)
      {
        return (int)value == 0 ? Visibility.Visible : Visibility.Hidden;
      }

      return Visibility.Visible;
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
      throw new NotImplementedException();
    }

    #endregion
  }
}